<?php if(!empty($errors)) { ?>
<h1>Form Errors</h1>
<p>Sorry, there was a problem with your submission:</p>

<?php

    $header = content_tag('h2','Error!');
	$body   = content_tag('p','Your form contained the following errors:');
	foreach( $errors as $key => $value )
	{
	    $key     = ucwords(str_replace("_"," ",$key));
		$errors_li .= content_tag('li',"$key: ".implode("<br>",$value));
	}
	$error_list = content_tag('ul',$errors_li);
	echo content_tag('div',$header.$body.$error_list,array('class'=>'div_form_error_list'));

?>

<?php } ?>